inherited FPesquisaContasReceber: TFPesquisaContasReceber
  Left = 273
  Top = 184
  Caption = 'Pesquisa Contas a Receber'
  ClientHeight = 460
  ClientWidth = 690
  OldCreateOrder = True
  OnKeyDown = FormKeyDown
  PixelsPerInch = 96
  TextHeight = 13
  inherited Panel2: TPanel
    Width = 690
    inherited BtnLimpar: TBitBtn
      OnClick = BtnLimparClick
    end
    inherited BtnImprimir: TBitBtn
      OnClick = BtnImprimirClick
    end
    inherited BtnSelecionar: TBitBtn
      Left = 385
      Enabled = False
      Visible = False
    end
    inherited BtnFechar: TBitBtn
      Left = 242
    end
  end
  inherited Panel1: TPanel
    Width = 690
    Height = 419
    object Label1: TLabel [0]
      Left = 7
      Top = 258
      Width = 79
      Height = 13
      Caption = 'Tipo Documento'
    end
    object Label2: TLabel [1]
      Left = 7
      Top = 154
      Width = 56
      Height = 13
      Caption = 'Cliente (F-8)'
    end
    object Label3: TLabel [2]
      Left = 7
      Top = 233
      Width = 40
      Height = 13
      Caption = 'Portador'
    end
    object Label4: TLabel [3]
      Left = 7
      Top = 206
      Width = 80
      Height = 13
      Caption = 'Class. Financeira'
    end
    object Label5: TLabel [4]
      Left = 354
      Top = 68
      Width = 42
      Height = 13
      Caption = 'Situa'#231#227'o'
    end
    object Label6: TLabel [5]
      Left = 194
      Top = 42
      Width = 6
      Height = 13
      Caption = #225
    end
    object Label7: TLabel [6]
      Left = 7
      Top = 68
      Width = 82
      Height = 13
      Caption = 'Data Vencimento'
    end
    object Label8: TLabel [7]
      Left = 194
      Top = 66
      Width = 6
      Height = 13
      Caption = #225
    end
    object Label9: TLabel [8]
      Left = 7
      Top = 42
      Width = 85
      Height = 13
      Caption = 'Data Lan'#231'amento'
    end
    object Label10: TLabel [9]
      Left = 7
      Top = 339
      Width = 46
      Height = 13
      Caption = 'Empresas'
    end
    object Label11: TLabel [10]
      Left = 445
      Top = 426
      Width = 33
      Height = 13
      Caption = 'Codigo'
      Visible = False
    end
    object Label12: TLabel [11]
      Left = 354
      Top = 42
      Width = 55
      Height = 13
      Caption = 'Documento'
    end
    object Label13: TLabel [12]
      Left = 354
      Top = 172
      Width = 86
      Height = 13
      Caption = 'Natureza Portador'
    end
    object Label15: TLabel [13]
      Left = 354
      Top = 16
      Width = 33
      Height = 13
      Caption = 'Origem'
    end
    object Label14: TLabel [14]
      Left = 7
      Top = 16
      Width = 81
      Height = 13
      Caption = 'Data Documento'
    end
    object Label16: TLabel [15]
      Left = 194
      Top = 13
      Width = 6
      Height = 13
      Caption = #225
    end
    object Label17: TLabel [16]
      Left = 354
      Top = 146
      Width = 112
      Height = 13
      Caption = 'Grupo Class. Financeiro'
    end
    object Label18: TLabel [17]
      Left = 354
      Top = 120
      Width = 96
      Height = 13
      Caption = 'Grupo Centro. Custo'
    end
    object Label19: TLabel [18]
      Left = 7
      Top = 180
      Width = 76
      Height = 13
      Caption = 'Centro de Custo'
    end
    object Label20: TLabel [19]
      Left = 354
      Top = 94
      Width = 64
      Height = 13
      Caption = 'Grupo Cliente'
      FocusControl = BtnConsultar
    end
    object Label21: TLabel [20]
      Left = 354
      Top = 198
      Width = 74
      Height = 13
      Caption = 'N'#186' da Remessa'
    end
    object Label22: TLabel [21]
      Left = 5
      Top = 284
      Width = 85
      Height = 13
      Caption = 'Fonte de Recurso'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      ParentFont = False
    end
    object Label23: TLabel [22]
      Left = 7
      Top = 120
      Width = 80
      Height = 13
      Caption = 'Data Pagamento'
    end
    object Label24: TLabel [23]
      Left = 194
      Top = 118
      Width = 6
      Height = 13
      Caption = #225
    end
    object Label25: TLabel [24]
      Left = 4
      Top = 307
      Width = 24
      Height = 13
      Caption = 'Valor'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      ParentFont = False
    end
    object Label26: TLabel [25]
      Left = 182
      Top = 310
      Width = 6
      Height = 13
      Caption = #224
    end
    object Label27: TLabel [26]
      Left = 7
      Top = 93
      Width = 67
      Height = 13
      Caption = 'Data da Baixa'
    end
    object Label28: TLabel [27]
      Left = 194
      Top = 91
      Width = 6
      Height = 13
      Caption = #225
    end
    inherited DBGrid1: TDBGrid
      Top = 358
      Width = 688
      Height = 0
      TabOrder = 26
      Columns = <
        item
          Expanded = False
          FieldName = 'CODIGO'
          Title.Caption = 'Titulo'
          Visible = True
        end
        item
          Expanded = False
          FieldName = 'CLIENTE'
          Title.Caption = 'Cliente'
          Visible = True
        end
        item
          Expanded = False
          FieldName = 'DATA'
          Title.Caption = 'Data'
          Visible = True
        end
        item
          Expanded = False
          FieldName = 'VENCIMENTO'
          Title.Caption = 'Vencimento'
          Visible = True
        end
        item
          Expanded = False
          FieldName = 'DOCUMENTO'
          Title.Caption = 'Documento'
          Visible = True
        end
        item
          Expanded = False
          FieldName = 'HISTORICO'
          Title.Caption = 'Hist'#243'rico'
          Visible = True
        end
        item
          Expanded = False
          FieldName = 'VALOR'
          Title.Caption = 'Valor'
          Visible = True
        end
        item
          Expanded = False
          FieldName = 'SALDO'
          Title.Caption = 'saldo'
          Visible = True
        end
        item
          Expanded = False
          FieldName = 'PAGO'
          Title.Caption = 'Pago'
          Visible = True
        end>
    end
    inherited Panel3: TPanel
      Top = 398
      Width = 688
      TabOrder = 24
    end
    object DBLCBCliente: TDBLookupComboBox
      Left = 98
      Top = 146
      Width = 250
      Height = 19
      Ctl3D = False
      KeyField = 'CLI_CODIGO'
      ListField = 'CLI_RAZAO'
      ListSource = DSCliente
      ParentCtl3D = False
      TabOrder = 8
      OnKeyDown = DBLCBClienteKeyDown
    end
    object DBLCBTipoDocumento: TDBLookupComboBox
      Left = 98
      Top = 250
      Width = 250
      Height = 19
      Ctl3D = False
      KeyField = 'TIPO_DOC_CODIGO'
      ListField = 'TIPO_DOC_DESCRICAO'
      ListSource = DSTipoDocumento
      ParentCtl3D = False
      TabOrder = 15
      OnKeyDown = DBLCBClienteKeyDown
    end
    object DBLCBPortador: TDBLookupComboBox
      Left = 98
      Top = 224
      Width = 250
      Height = 19
      Ctl3D = False
      KeyField = 'PORT_CODIGO'
      ListField = 'PORT_DESCRICAO'
      ListSource = DSPortador
      ParentCtl3D = False
      TabOrder = 13
      OnKeyDown = DBLCBClienteKeyDown
    end
    object DBLCBPlanoContas: TDBLookupComboBox
      Left = 98
      Top = 198
      Width = 250
      Height = 19
      Ctl3D = False
      KeyField = 'CODIGO'
      ListField = 'DESCRICAO'
      ListSource = DSPlano
      ParentCtl3D = False
      TabOrder = 11
      OnKeyDown = DBLCBClienteKeyDown
    end
    object DEDataTituloIni: TDateEdit
      Left = 98
      Top = 34
      Width = 88
      Height = 21
      Ctl3D = False
      NumGlyphs = 2
      ParentCtl3D = False
      TabOrder = 2
    end
    object DEDataTituloFim: TDateEdit
      Left = 212
      Top = 34
      Width = 88
      Height = 21
      Ctl3D = False
      NumGlyphs = 2
      ParentCtl3D = False
      TabOrder = 3
    end
    object DEDataVencimentoIni: TDateEdit
      Left = 98
      Top = 60
      Width = 88
      Height = 21
      Ctl3D = False
      NumGlyphs = 2
      ParentCtl3D = False
      TabOrder = 4
    end
    object DEDataVencimentoFim: TDateEdit
      Left = 212
      Top = 60
      Width = 88
      Height = 21
      Ctl3D = False
      NumGlyphs = 2
      ParentCtl3D = False
      TabOrder = 5
    end
    object CBSituacao: TComboBox
      Left = 475
      Top = 60
      Width = 100
      Height = 21
      Ctl3D = False
      ItemHeight = 13
      ItemIndex = 0
      ParentCtl3D = False
      TabOrder = 21
      Text = 'Todos'
      Items.Strings = (
        'Todos'
        'Em aberto'
        'Pagos')
    end
    object CLBEmpresas: TCheckListBox
      Left = 1
      Top = 358
      Width = 688
      Height = 40
      Align = alBottom
      Columns = 1
      ItemHeight = 13
      TabOrder = 23
    end
    object CkBTodasEmpresas: TCheckBox
      Left = 63
      Top = 339
      Width = 142
      Height = 17
      BiDiMode = bdLeftToRight
      Caption = 'Todas as Empresas'
      ParentBiDiMode = False
      TabOrder = 22
      OnClick = CkBTodasEmpresasClick
    end
    object RGRelatorio: TRadioGroup
      Left = 412
      Top = 351
      Width = 122
      Height = 72
      Caption = 'Agrupando por :'
      ItemIndex = 0
      Items.Strings = (
        'Vencimento'
        'Cliente'
        'Portador'
        'T.Documento')
      TabOrder = 27
      Visible = False
      OnClick = RGRelatorioClick
    end
    object ETitulo: TEdit
      Left = 445
      Top = 439
      Width = 76
      Height = 21
      TabStop = False
      TabOrder = 25
      Visible = False
    end
    object EDocumento: TEdit
      Left = 475
      Top = 34
      Width = 71
      Height = 19
      Ctl3D = False
      MaxLength = 10
      ParentCtl3D = False
      TabOrder = 19
    end
    object CBSituacaoTitulo: TComboBox
      Left = 475
      Top = 164
      Width = 100
      Height = 21
      Ctl3D = False
      ItemHeight = 13
      ItemIndex = 0
      ParentCtl3D = False
      TabOrder = 14
      Text = 'Todos'
      Items.Strings = (
        'Todos'
        'Descontados'
        'N'#227'o Descontados')
    end
    object DEDataDocumentoInicio: TDateEdit
      Left = 98
      Top = 8
      Width = 88
      Height = 21
      Ctl3D = False
      NumGlyphs = 2
      ParentCtl3D = False
      TabOrder = 0
    end
    object DEDataDocumentoFim: TDateEdit
      Left = 212
      Top = 8
      Width = 88
      Height = 21
      Ctl3D = False
      NumGlyphs = 2
      ParentCtl3D = False
      TabOrder = 1
    end
    object EGrupoFinanceiro: TEdit
      Left = 475
      Top = 138
      Width = 46
      Height = 19
      Ctl3D = False
      MaxLength = 2
      ParentCtl3D = False
      TabOrder = 12
    end
    object EGrupoCentroCusto: TEdit
      Left = 475
      Top = 112
      Width = 46
      Height = 19
      Ctl3D = False
      MaxLength = 2
      ParentCtl3D = False
      TabOrder = 10
    end
    object DBLCBCentroCusto: TDBLookupComboBox
      Left = 98
      Top = 172
      Width = 250
      Height = 19
      Ctl3D = False
      KeyField = 'CODIGO'
      ListField = 'DESCRICAO'
      ListSource = DSCentro
      ParentCtl3D = False
      TabOrder = 9
      OnKeyDown = DBLCBClienteKeyDown
    end
    object cbxTipoBusca: TComboBox
      Left = 551
      Top = 34
      Width = 72
      Height = 21
      Ctl3D = False
      ItemHeight = 13
      ItemIndex = 0
      ParentCtl3D = False
      TabOrder = 20
      Text = 'igual'
      OnChange = cbxTipoBuscaChange
      OnKeyPress = cbxTipoBuscaKeyPress
      Items.Strings = (
        'igual'
        'contendo')
    end
    object EOrigem: TComboBox
      Left = 475
      Top = 8
      Width = 148
      Height = 21
      Ctl3D = False
      ItemHeight = 13
      ParentCtl3D = False
      TabOrder = 18
      Text = 'Todos'
      OnChange = EOrigemChange
      OnKeyPress = FormKeyPress
      Items.Strings = (
        'Todos'
        'Digitado'
        'Programado'
        'Prog. Avulso'
        'Compras'
        'Vendas'
        'Compras 1'
        'Compras 2'
        'Compras 3')
    end
    object cbTotalGeral: TCheckBox
      Left = 352
      Top = 307
      Width = 137
      Height = 17
      Caption = 'Exibir Total Acumulado'
      TabOrder = 28
    end
    object edGrupoCliente: TEdit
      Left = 475
      Top = 86
      Width = 100
      Height = 19
      Ctl3D = False
      MaxLength = 5
      ParentCtl3D = False
      TabOrder = 29
      OnKeyPress = edGrupoClienteKeyPress
    end
    object edNRemessa: TEdit
      Left = 475
      Top = 190
      Width = 100
      Height = 19
      Ctl3D = False
      MaxLength = 7
      ParentCtl3D = False
      TabOrder = 16
    end
    object CBOmitirDethalhes: TCheckBox
      Left = 352
      Top = 323
      Width = 117
      Height = 17
      Caption = 'Omitir detalhes'
      TabOrder = 30
    end
    object cbOrdemPorValor: TRadioButton
      Left = 524
      Top = 308
      Width = 162
      Height = 17
      Caption = 'Ordenar pelo valor do t'#237'tulo'
      TabOrder = 31
    end
    object cbOrdemPorNDocto: TRadioButton
      Left = 524
      Top = 324
      Width = 163
      Height = 17
      Caption = 'Ordenar pelo n'#186' do documento'
      TabOrder = 32
    end
    object cbOrdemPorVencto: TRadioButton
      Left = 524
      Top = 340
      Width = 145
      Height = 17
      Caption = 'Ordenar pelo vencimento'
      TabOrder = 33
    end
    object cbDataEmissao: TCheckBox
      Left = 352
      Top = 340
      Width = 172
      Height = 17
      Caption = 'Exibir a data de emiss'#227'o da NF'
      TabOrder = 34
      Visible = False
    end
    object DBLFonteRecurso: TDBLookupComboBox
      Left = 98
      Top = 276
      Width = 250
      Height = 19
      Ctl3D = False
      KeyField = 'FONT_CODIGO'
      ListField = 'FONT_DESCRICAO'
      ListSource = DSFonteRecurso
      ParentCtl3D = False
      TabOrder = 17
      OnKeyDown = DBLFonteRecursoKeyDown
    end
    object DEDataPagamentoIni: TDateEdit
      Left = 98
      Top = 112
      Width = 88
      Height = 21
      Ctl3D = False
      NumGlyphs = 2
      ParentCtl3D = False
      TabOrder = 6
    end
    object DEDataPagamentoFim: TDateEdit
      Left = 212
      Top = 112
      Width = 88
      Height = 21
      Ctl3D = False
      NumGlyphs = 2
      ParentCtl3D = False
      TabOrder = 7
    end
    object edValorIni: TRxCalcEdit
      Left = 98
      Top = 304
      Width = 80
      Height = 19
      AutoSize = False
      Ctl3D = False
      DisplayFormat = '#,##0.00'
      ButtonWidth = 0
      NumGlyphs = 2
      ParentCtl3D = False
      TabOrder = 35
    end
    object edValorFim: TRxCalcEdit
      Left = 193
      Top = 304
      Width = 80
      Height = 19
      AutoSize = False
      Ctl3D = False
      DisplayFormat = '#,##0.00'
      ButtonWidth = 0
      NumGlyphs = 2
      ParentCtl3D = False
      TabOrder = 36
    end
    object cbTipoValor: TComboBox
      Left = 277
      Top = 304
      Width = 73
      Height = 21
      Ctl3D = False
      ItemHeight = 13
      ItemIndex = 0
      ParentCtl3D = False
      TabOrder = 37
      Text = 'T'#237'tulo'
      Items.Strings = (
        'T'#237'tulo'
        'Docto'
        'Saldo')
    end
    object dtBaixaIni: TDateEdit
      Left = 98
      Top = 85
      Width = 88
      Height = 21
      Ctl3D = False
      NumGlyphs = 2
      ParentCtl3D = False
      TabOrder = 38
    end
    object dtBaixaFim: TDateEdit
      Left = 212
      Top = 85
      Width = 88
      Height = 21
      Ctl3D = False
      NumGlyphs = 2
      ParentCtl3D = False
      TabOrder = 39
    end
    object CBValorZero: TCheckBox
      Left = 352
      Top = 291
      Width = 137
      Height = 17
      Caption = 'Sem Valor Zero'
      Checked = True
      State = cbChecked
      TabOrder = 40
    end
  end
  inherited QPesquisa: TQuery
    AutoRefresh = True
    SQL.Strings = (
      'SELECT'
      '  CLI_RAZAO AS CLIENTE,'
      '  CR_CODIGO AS CODIGO,'
      '  CR_DATATITULO AS DATA,'
      '  CR_DATAVENCIMENTO AS VENCIMENTO,'
      '  CR_DOCUMENTO AS DOCUMENTO,'
      '  CR_HISTORICO1 AS HISTORICO1,'
      '  CR_HISTORICO2 AS HISTORICO2,'
      '  CR_VALOR AS VALOR,'
      '  PORTADOR.PORT_DESCONTADO,'
      '  PORTADOR.PORT_COD_RELATORIO,'
      '  SUM(LANC_DESCONTO) AS DESCTO,'
      '  SUM(LANC_DESCONTO) AS DESCONTO,'
      '  SUM(LANC_VALOR) AS PAGO'
      'FROM'
      'CONTASRECEBER'
      'LEFT JOIN CLIENTE ON  (CLI_CODIGO = CR_CLIENTE)'
      'LEFT JOIN PORTADOR ON (PORT_CODIGO = CR_PORTADOR)'
      'LEFT JOIN CENTROCUSTO ON  (CENTROCUSTO.CODIGO = CR_CENTROCUSTO)'
      'LEFT JOIN PLANOCONTAS ON  (PLANOCONTAS.CODIGO = CR_PLANO)'
      
        'LEFT JOIN LANCAMENTO   ON ((CONTASRECEBER.CR_CODIGO  = LANCAMENT' +
        'O.LANC_TITULO)'
      
        '  AND (LANCAMENTO.EXCLUIDO <> '#39'S'#39' OR LANCAMENTO.EXCLUIDO IS NULL' +
        ')'
      'AND (LANCAMENTO.LANC_CPCR = '#39'R'#39'))'
      'WHERE'
      
        '(CONTASRECEBER.EXCLUIDO <> '#39'S'#39' OR CONTASRECEBER.EXCLUIDO IS NULL' +
        ')AND'
      '(CONTASRECEBER.CODIGOEMPRESA IN ( 1) )'
      'AND (CONTASRECEBER.CR_VALOR <> 0 )'
      ' and (CR_DataVencimento  <= '#39'10/15/2012 00:00:00'#39' )'
      'GROUP BY'
      '    CR_DATAVENCIMENTO,'
      '    CLI_RAZAO,'
      '    CR_CODIGO,'
      '    CR_DATATITULO,'
      '    CR_DOCUMENTO,'
      '    CR_HISTORICO1,'
      '    CR_HISTORICO2,'
      '    CR_VALOR,'
      '    CR_VALORDOCTO,'
      '    PORT_DESCONTADO,'
      '    CR_SALDO,'
      '    PORTADOR.PORT_COD_RELATORIO,'
      '    CONTASRECEBER.EXCLUIDO'
      
        'HAVING SUM(cast(((LANC_VALOR + LANC_DESCONTO) - 0.004) AS numeri' +
        'c(10,2))) < cast((CR_VALOR - 0.004) AS numeric(10,2))OR (SUM(cas' +
        't(((LANC_VALOR + LANC_DESCONTO) - 0.004) AS numeric(10,2))) IS N' +
        'ULL)')
    Left = 472
    Top = 289
  end
  inherited DSPesquisa: TDataSource
    Left = 608
    Top = 273
  end
  object DSCliente: TDataSource
    DataSet = DMGestao.QCliente
    Left = 608
    Top = 216
  end
  object DSTipoDocumento: TDataSource
    DataSet = DMFinanceiro.QTipoDocumento
    Left = 648
    Top = 56
  end
  object DSPlano: TDataSource
    DataSet = DMFinanceiro.QPlano
    Left = 632
    Top = 160
  end
  object DSPortador: TDataSource
    DataSet = DMFinanceiro.Qportador
    Left = 632
    Top = 128
  end
  object DSCentro: TDataSource
    DataSet = DMFinanceiro.QCentro
    Left = 640
    Top = 232
  end
  object DSFonteRecurso: TDataSource
    DataSet = DMFinanceiro.QFonteRecurso
    Left = 208
    Top = 216
  end
end
